package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;

/**
 * 根据openid查询用户
 */
@Mapper
public interface UserMapper {
    @Select("select * from user where openid = #{openid}")
    User getByOpenID(String openid);




    void insert(User user);
@Select("select name from user where id =#{userId}")
    String getByUserId(Long userId);
@Select("select * from user where id = #{id}")
User getById(Long userId);

    /**
     * 统计每日用户新增数量
     * @param map
     * @return
     */

    Integer countByMap(HashMap<Object, Object> map);

    /**
     * 统计每日用户总数
     * @param map
     * @return
     */

}
